function Process()
{
  if( document.msg.opStatus.value == "" )
  {
    //------------------------------------------------------------------------
    //            Process only on the initial page load
    //------------------------------------------------------------------------
    
    document.msg.opStatus.value = opener.msgOp;
    if( (opener.msgOp == "SAVE") || (opener.msgOp == "TEST") )
    {
      //*** Generate the XML data
      var data = document.msg.xmlData;
      data.value = opener.GenerateXml( false );

      //*** Get the desired name
      document.msg.fileName.value = opener.GetDataName();
    }
    else if( opener.msgOp == "LOAD" )
    {
      //*** Get the desired name
      document.msg.fileName.value = opener.GetDataName();
    }
    if( (opener.msgOp == "SETP") )
    {
      //*** Get the path name so we can set it.
      document.msg.pathName.value = opener.GetPathName();
    }


    //*** Submit the data
    document.msg.submit();
  }
  else
  {
    //------------------------------------------------------------------------
    //             Process the results of a submittal
    //------------------------------------------------------------------------
    
    if( (document.msg.opStatus.value == "OK") && (opener.msgOp == "LOAD") )
    {
      opener.ParseXml( document.msg.xmlData.value );
    }
    if( (document.msg.opStatus.value == "OK") && ( opener.msgOp == "GETP" ) )
    {      
      opener.SetPathName(document.msg.pathName.value);
    }
  }
}


function DisplayMessage()
{
  var msg = document.msg.opStatus.value;

  document.write( "<U><B><FONT size=\"4\">" + opener.msgTitle + "</FONT></B></U>" );
  window.focus();
  if( msg == "" )
  {
    document.write( "<br><br><P><B>Processing, please wait...</B></P>" );
  }
  else
  {
    document.write( "<br><br><P></P>" );
    if( document.msg.opStatus.value == "OK" )
    {
      document.write( "<B><FONT size=\"4\">*** Completed Successfully ****</FONT></B>" );
    }
    else
    {
      document.write( "<B><FONT size=\"8\">*** ERROR ****</FONT></B>" );
      document.write( "<br><P><B>" + document.msg.xmlData.value + "</B></P>" );
      window.resizeBy( 150, 100 );
    }
  }
}
